export default {
	// 分享到微信好友功能
	onShareAppMessage(res) {
		var pages = getCurrentPages()
		let currentRoute = pages[pages.length - 1].$page.fullPath
		let userId = uni.getStorageSync('userId')
		if(currentRoute=='pages/personal/invite/index'){
			return {
				title: "嗨～送你一份惊喜礼包，快来领取吧",
				path: `/pages/index/index?oldId=${userId}&from=invite`,
				imageUrl: "http://nanshufang-prod.obs.cn-sh1.ctyun.cn/assets/tenant-images/personal/share.png"
			}
		}else{
			return {
				title: '南舒房',
				path: `/${currentRoute}?oldId=${userId}&from=invite`
			}
		}
	},
	// 分享到朋友圈功能
	onShareTimeline(res) {
		var pages = getCurrentPages()
		let currentRoute = pages[pages.length - 1].$page.fullPath
		let userId = uni.getStorageSync('userId')
		if(currentRoute=='pages/personal/invite/index'){
			return {
				title: "嗨～送你一份惊喜礼包，快来领取吧",
				path: `/pages/index/index?oldId=${userId}&from=invite`,
				imageUrl: "http://nanshufang-prod.obs.cn-sh1.ctyun.cn/assets/tenant-images/personal/share.png"
			}
		}else{
			return {
				title: '南舒房',
				path: `/${currentRoute}?oldId=${userId}&from=invite`
			}
		}
	},
}
